<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>sse</title>
</head>
<body>
<div id="msgFromServer"></div>
<div id="sse"></div>
</body>
<script>
    let sse = new EventSource("http://127.0.0.1:8080/sse");
    let sseEl = document.getElementById("sse");
    sse.onmessage = (ev)=>{
        sseEl.innerText = ev.data
    }

</script>
</html>
